package com.wash.shoes.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 收支明细,订单变为完成的时候入账
 *
 * @TableName os_region_transaction_detail
 */
@ApiModel(value = "收支明细,订单变为完成的时候入账")
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("os_region_transaction_detail")
public class RegionTransactionDetailPo {
    /**
     * 主键
     */
    @ApiModelProperty(value = "id")
    private String id;

    /**
     * 订单的ID
     */
    @ApiModelProperty(value = "订单的ID")
    private String orderId;

    /**
     * 推广用户的ID
     */
    @ApiModelProperty(value = "推广用户的ID")
    private String recommendId;

    /**
     * 1收入 2支出
     */
    @ApiModelProperty(value = "1收入 2支出")
    private String type;

    /**
     * 分成比例
     */
    @ApiModelProperty(value = "分成比例")
    private Double shareRatio;

    /**
     * 总价 = 订单金额 - 优惠价格
     */
    @ApiModelProperty(value = "总价")
    private Double totalPrice;

    /**
     * 分成收益 = 总价 * 分成比例
     */
    @ApiModelProperty(value = "分成收益")
    private Double promotionProfit;

    /**
     * 状态 0生成 1有效 2无效
     */
    @ApiModelProperty(value = "状态 0入账中 1有效 2无效")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "扩展字段")
    private String extendInfo;

    @TableField(value = "create_by", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建者")
    private String createBy;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新者")
    private String updateBy;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
}